public class CounterSnapshotModel extends Object implements XMLMarshallable, Comparable<CounterSnapshotModel>
counters are organized in a structure
similar to the associated subscription (root subscription, sub-subscription(s),
charge activation(s)).
A snapshot contains the following information:
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="counterSnapshot">
<xs:complexType>
<xs:sequence>
<xs:element ref="subscriptionSnapshotHolder" minOccurs="0" maxOccurs="1" />
</xs:sequence>
<xs:attribute name="date" type="xs:date" />
<xs:attribute name="numberOfDaysInThePast" type="xs:int" />
<xs:attribute name="minimalTransactionSetId" type="xs:long" />
<xs:attribute name="inError" type="xs:boolean" />
</xs:complexType>
</xs:element>
| Modifier and Type | Field and Description |
|---|---|
static String |
MODEL_NAME
The XML name of the object: counterSnapshot
|
| Constructor and Description |
|---|
CounterSnapshotModel()
Builds an empty
CounterSnapshotModel object |
| Modifier and Type | Method and Description |
|---|---|
void |
addCharacterData(String cData)
Adds character data to the content element.
|
void |
addChild(String tagName,
XMLMarshallable child)
Adds a child to the object, the
child representing
the marshallable object which must be added to the element. |
int |
compareTo(CounterSnapshotModel that)
Compare this counter snapshot with the one specified in argument, using their
date |
Date |
getDate()
Gets the date of the counter snapshot
|
long |
getMinimalTransactionSetId()
Gets the lowest transaction set identifier which was generated by a rating performed on the counter snapshot
|
int |
getNumberOfDaysInThePast()
Gets the maximum number of days in the past for the counter snapshot (corresponds to the difference between the date of the
counter snapshot and the consumption date of the oldest late CDR rated on the counter snapshot).
|
SubscriptionSnapshotHolderModel |
getRootSubscription()
Gets the
subscription snapshot holder corresponding to the root
subscription |
boolean |
isInError()
Gets whether the counter snapshot is erroneous
|
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, including its children.
|
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being
processed.
|
void |
setDate(Date date)
Sets the date of the counter snapshot
|
void |
setInError(boolean inError)
Sets whether the counter snapshot is erroneous
|
void |
setMinimalTransactionSetId(long minimalTransactionSetId)
Sets the lowest transaction set identifier which was generated by a rating performed on the counter snapshot
|
void |
setNumberOfDaysInThePast(int numberOfDaysInThePast)
Sets the maximum number of days in the past for the counter snapshot (corresponds to the difference between the date of the
counter snapshot and the consumption date of the oldest late CDR rated on the counter snapshot).
|
void |
setRootSubscription(SubscriptionSnapshotHolderModel rootSubscription)
Sets the
subscription snapshot holder corresponding to the root
subscription |
public static final String MODEL_NAME
public CounterSnapshotModel()
CounterSnapshotModel objectpublic Date getDate()
public void setDate(Date date)
date - The date of the counter snapshotpublic int getNumberOfDaysInThePast()
public void setNumberOfDaysInThePast(int numberOfDaysInThePast)
numberOfDaysInThePast - the maximum number of days in the past for the counter snapshotpublic long getMinimalTransactionSetId()
public void setMinimalTransactionSetId(long minimalTransactionSetId)
minimalTransactionSetId - The lowest transaction set identifier which was generated by a rating performed on the counter snapshotpublic boolean isInError()
true if the counter snapshot is erroneous, false otherwisepublic void setInError(boolean inError)
inError - true if the counter snapshot is erroneous, false otherwisepublic SubscriptionSnapshotHolderModel getRootSubscription()
subscription snapshot holder corresponding to the root
subscriptionsubscription snapshot holder corresponding to the root
subscriptionpublic void setRootSubscription(SubscriptionSnapshotHolderModel rootSubscription)
subscription snapshot holder corresponding to the root
subscriptionrootSubscription - The subscription snapshot holder corresponding to the root
subscriptionpublic int compareTo(CounterSnapshotModel that)
datecompareTo in interface Comparable<CounterSnapshotModel>public void addCharacterData(String cData)
XMLMarshallableaddCharacterData in interface XMLMarshallablecData - The character data to be addedpublic void addChild(String tagName, XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.addChild in interface XMLMarshallabletagName - The name of tag for the childchild - The child to be addedpublic void setAttributes(XMLAttributes atts)
XMLMarshallablesetAttributes in interface XMLMarshallableatts - The XML attributes of the current elementpublic void marshal(XMLOutputter output)
XMLMarshallablemarshal in interface XMLMarshallableoutput - The XML output to marshal the object into